﻿namespace ACCOUNTING
{
    using ACCOUNTING.LVY.Business;
    using ACCOUNTING.My.Resources;
    using C1.Win.C1FlexGrid;
    using C1.Win.C1FlexGrid.Util.BaseControls;
    using C1.Win.C1Input;
    using Excel;
    using Microsoft.VisualBasic;
    using Microsoft.VisualBasic.CompilerServices;
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Diagnostics;
    using System.Drawing;
    using System.Reflection;
    using System.Runtime.CompilerServices;
    using System.Runtime.InteropServices;
    using System.Windows.Forms;

    [DesignerGenerated]
    public class Frm_RptTongHopHangHoaMuaVao : Form
    {
        private static List<WeakReference> __ENCList = new List<WeakReference>();
        [AccessedThroughProperty("AdvNhaCungCap")]
        private ADVObjects _AdvNhaCungCap;
        [AccessedThroughProperty("CboKhoHang")]
        private ComboBox _CboKhoHang;
        [AccessedThroughProperty("CboLoaiChungTu")]
        private ComboBox _CboLoaiChungTu;
        [AccessedThroughProperty("CmdExel")]
        private System.Windows.Forms.Button _CmdExel;
        [AccessedThroughProperty("CmdLoad")]
        private System.Windows.Forms.Button _CmdLoad;
        [AccessedThroughProperty("Label1")]
        private System.Windows.Forms.Label _Label1;
        [AccessedThroughProperty("Label13")]
        private System.Windows.Forms.Label _Label13;
        [AccessedThroughProperty("Label2")]
        private System.Windows.Forms.Label _Label2;
        [AccessedThroughProperty("Label3")]
        private System.Windows.Forms.Label _Label3;
        [AccessedThroughProperty("Label4")]
        private System.Windows.Forms.Label _Label4;
        [AccessedThroughProperty("Label7")]
        private System.Windows.Forms.Label _Label7;
        [AccessedThroughProperty("Panel1")]
        private Panel _Panel1;
        [AccessedThroughProperty("Panel2")]
        private Panel _Panel2;
        [AccessedThroughProperty("TxtDenNgay")]
        private DateTimePicker _TxtDenNgay;
        [AccessedThroughProperty("TxtTongChiPhi")]
        private C1NumericEdit _TxtTongChiPhi;
        [AccessedThroughProperty("TxtTongThanhToan")]
        private C1NumericEdit _TxtTongThanhToan;
        [AccessedThroughProperty("TxtTongTriGiaMua")]
        private C1NumericEdit _TxtTongTriGiaMua;
        [AccessedThroughProperty("TxtTuNgay")]
        private DateTimePicker _TxtTuNgay;
        [AccessedThroughProperty("VSlist")]
        private C1.Win.C1FlexGrid.C1FlexGrid _VSlist;
        private IContainer components;
        private bool mAllowAdd;
        private bool mAllowDel;
        private bool mAllowEdit;
        private bool mAllowView;

        [DebuggerNonUserCode]
        public Frm_RptTongHopHangHoaMuaVao()
        {
            base.Load += new EventHandler(this.Frm_RptTongHopHangHoaMuaVao_Load);
            List<WeakReference> list = __ENCList;
            lock (list)
            {
                __ENCList.Add(new WeakReference(this));
            }
            this.InitializeComponent();
        }

        private void CmdExel_Click(object sender, EventArgs e)
        {
            try
            {
                SaveFileDialog dialog = new SaveFileDialog {
                    Filter = "Excel Files|*.xls",
                    Title = "Save an Excel file"
                };
                dialog.ShowDialog();
                if (dialog.FileName != "")
                {
                    this.VSlist.SaveExcel(dialog.FileName, "HangHoaMuaVao", FileFlags.IncludeFixedCells);
                    Excel.Application application = new ApplicationClass();
                    Workbook workbook = application.Workbooks.Open(dialog.FileName, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value);
                    application.Visible = true;
                }
            }
            catch (COMException exception1)
            {
                ProjectData.SetProjectError(exception1);
                COMException exception = exception1;
                MessageBox.Show(exception.Message);
                ProjectData.ClearProjectError();
            }
            catch (Exception exception3)
            {
                ProjectData.SetProjectError(exception3);
                Exception exception2 = exception3;
                MessageBox.Show(exception2.Message);
                ProjectData.ClearProjectError();
            }
        }

        private void CmdLoad_Click(object sender, EventArgs e)
        {
            this.loadData();
        }

        [DebuggerNonUserCode]
        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void Frm_RptTongHopHangHoaMuaVao_Load(object sender, EventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;
            LVYModule.GetUserRight(ref this.mAllowView, ref this.mAllowDel, ref this.mAllowEdit, ref this.mAllowAdd, Conversions.ToString(this.Tag), modGeneral.H_USERNAME);
            if (!this.mAllowView)
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn kh\x00f4ng c\x00f3 quyền xem, li\x00ean hệ với người quản trị để biết th\x00eam chi tiết.", ""));
                this.Dispose();
            }
            else
            {
                this.TxtTuNgay.Text = "01/" + LVYModule.sRight("00" + Conversions.ToString(DateAndTime.Month(DateAndTime.Today)), 2) + "/" + Conversions.ToString(DateAndTime.Year(DateAndTime.Today));
                BuildComboModule.BuildCombo(this.CboKhoHang, modGeneral.ListDanhMuc.KhoHang, true, "", "");
                this.CboLoaiChungTu.Items.Clear();
                this.CboLoaiChungTu.Items.Add(modGeneral.Tranlated("Tất cả", ""));
                this.CboLoaiChungTu.Items.Add(modGeneral.Tranlated("H\x00e0ng trong nước", ""));
                this.CboLoaiChungTu.Items.Add(modGeneral.Tranlated("H\x00e0ng nhập khẩu", ""));
                this.CboLoaiChungTu.SelectedIndex = 0;
                LVYModule.advFormatNumber(this.TxtTongChiPhi, modGeneral.H_FORMATNUMBER);
                LVYModule.advFormatNumber(this.TxtTongThanhToan, modGeneral.H_FORMATNUMBER);
                LVYModule.advFormatNumber(this.TxtTongTriGiaMua, modGeneral.H_FORMATNUMBER);
                this.Cursor = Cursors.Default;
            }
        }

        [DebuggerStepThrough]
        private void InitializeComponent()
        {
            ComponentResourceManager manager = new ComponentResourceManager(typeof(Frm_RptTongHopHangHoaMuaVao));
            this.Panel1 = new Panel();
            this.CmdExel = new System.Windows.Forms.Button();
            this.CboLoaiChungTu = new ComboBox();
            this.CmdLoad = new System.Windows.Forms.Button();
            this.Label4 = new System.Windows.Forms.Label();
            this.AdvNhaCungCap = new ADVObjects();
            this.Label3 = new System.Windows.Forms.Label();
            this.CboKhoHang = new ComboBox();
            this.Label2 = new System.Windows.Forms.Label();
            this.Label1 = new System.Windows.Forms.Label();
            this.TxtDenNgay = new DateTimePicker();
            this.Label13 = new System.Windows.Forms.Label();
            this.TxtTuNgay = new DateTimePicker();
            this.Panel2 = new Panel();
            this.TxtTongTriGiaMua = new C1NumericEdit();
            this.TxtTongChiPhi = new C1NumericEdit();
            this.TxtTongThanhToan = new C1NumericEdit();
            this.Label7 = new System.Windows.Forms.Label();
            this.VSlist = new C1.Win.C1FlexGrid.C1FlexGrid();
            this.Panel1.SuspendLayout();
            this.Panel2.SuspendLayout();
            ((ISupportInitialize) this.TxtTongTriGiaMua).BeginInit();
            ((ISupportInitialize) this.TxtTongChiPhi).BeginInit();
            ((ISupportInitialize) this.TxtTongThanhToan).BeginInit();
            this.VSlist.BeginInit();
            this.SuspendLayout();
            this.Panel1.BackColor = SystemColors.ButtonFace;
            this.Panel1.BackgroundImage = ACCOUNTING.My.Resources.Resources.bgleft;
            this.Panel1.Controls.Add(this.CmdExel);
            this.Panel1.Controls.Add(this.CboLoaiChungTu);
            this.Panel1.Controls.Add(this.CmdLoad);
            this.Panel1.Controls.Add(this.Label4);
            this.Panel1.Controls.Add(this.AdvNhaCungCap);
            this.Panel1.Controls.Add(this.Label3);
            this.Panel1.Controls.Add(this.CboKhoHang);
            this.Panel1.Controls.Add(this.Label2);
            this.Panel1.Controls.Add(this.Label1);
            this.Panel1.Controls.Add(this.TxtDenNgay);
            this.Panel1.Controls.Add(this.Label13);
            this.Panel1.Controls.Add(this.TxtTuNgay);
            this.Panel1.Dock = DockStyle.Top;
            System.Drawing.Point point = new System.Drawing.Point(0, 0);
            this.Panel1.Location = point;
            this.Panel1.Name = "Panel1";
            Size size = new Size(0x3a6, 0x30);
            this.Panel1.Size = size;
            this.Panel1.TabIndex = 0;
            this.CmdExel.Image = (Image) manager.GetObject("CmdExel.Image");
            this.CmdExel.ImageAlign = ContentAlignment.MiddleLeft;
            point = new System.Drawing.Point(0x34c, 0x15);
            this.CmdExel.Location = point;
            this.CmdExel.Name = "CmdExel";
            size = new Size(0x53, 0x19);
            this.CmdExel.Size = size;
            this.CmdExel.TabIndex = 0x76;
            this.CmdExel.Text = "&Excel";
            this.CmdExel.UseVisualStyleBackColor = true;
            this.CboLoaiChungTu.DropDownStyle = ComboBoxStyle.DropDownList;
            this.CboLoaiChungTu.FormattingEnabled = true;
            point = new System.Drawing.Point(0xb2, 0x17);
            this.CboLoaiChungTu.Location = point;
            this.CboLoaiChungTu.Name = "CboLoaiChungTu";
            size = new Size(0x75, 0x15);
            this.CboLoaiChungTu.Size = size;
            this.CboLoaiChungTu.TabIndex = 0x75;
            this.CmdLoad.Image = ACCOUNTING.My.Resources.Resources.Selected;
            this.CmdLoad.ImageAlign = ContentAlignment.MiddleLeft;
            point = new System.Drawing.Point(760, 0x15);
            this.CmdLoad.Location = point;
            this.CmdLoad.Name = "CmdLoad";
            size = new Size(0x4e, 0x18);
            this.CmdLoad.Size = size;
            this.CmdLoad.TabIndex = 0x73;
            this.CmdLoad.Text = "&Load";
            this.CmdLoad.UseVisualStyleBackColor = true;
            this.Label4.AutoSize = true;
            this.Label4.BackColor = Color.Transparent;
            this.Label4.ForeColor = Color.Black;
            point = new System.Drawing.Point(0x1dd, 7);
            this.Label4.Location = point;
            this.Label4.Name = "Label4";
            size = new Size(0x4b, 13);
            this.Label4.Size = size;
            this.Label4.TabIndex = 0x72;
            this.Label4.Text = "Nh\x00e0 cung cấp";
            this.AdvNhaCungCap.Conditions = "";
            this.AdvNhaCungCap.LoaiDoiTuong = modGeneral.TypeObjects.NhaCungCap;
            point = new System.Drawing.Point(480, 0x17);
            this.AdvNhaCungCap.Location = point;
            this.AdvNhaCungCap.Name = "AdvNhaCungCap";
            this.AdvNhaCungCap.ReadOnly = false;
            size = new Size(0x116, 20);
            this.AdvNhaCungCap.Size = size;
            this.AdvNhaCungCap.TabIndex = 0x71;
            this.AdvNhaCungCap.UpperText = true;
            this.AdvNhaCungCap.Value = "";
            this.AdvNhaCungCap.WidthCode = 80;
            this.Label3.AutoSize = true;
            this.Label3.BackColor = Color.Transparent;
            this.Label3.ForeColor = Color.Black;
            point = new System.Drawing.Point(0x128, 6);
            this.Label3.Location = point;
            this.Label3.Name = "Label3";
            size = new Size(0x35, 13);
            this.Label3.Size = size;
            this.Label3.TabIndex = 0x4d;
            this.Label3.Text = "Kho h\x00e0ng";
            this.CboKhoHang.DropDownStyle = ComboBoxStyle.DropDownList;
            this.CboKhoHang.FormattingEnabled = true;
            point = new System.Drawing.Point(0x12b, 0x17);
            this.CboKhoHang.Location = point;
            this.CboKhoHang.Name = "CboKhoHang";
            size = new Size(0xb2, 0x15);
            this.CboKhoHang.Size = size;
            this.CboKhoHang.TabIndex = 0x4c;
            this.Label2.AutoSize = true;
            this.Label2.BackColor = Color.Transparent;
            this.Label2.ForeColor = Color.Black;
            point = new System.Drawing.Point(0xaf, 6);
            this.Label2.Location = point;
            this.Label2.Name = "Label2";
            size = new Size(0x48, 13);
            this.Label2.Size = size;
            this.Label2.TabIndex = 0x4b;
            this.Label2.Text = "Loại chứng từ";
            this.Label1.AutoSize = true;
            this.Label1.BackColor = Color.Transparent;
            this.Label1.ForeColor = Color.Black;
            point = new System.Drawing.Point(0x5c, 6);
            this.Label1.Location = point;
            this.Label1.Name = "Label1";
            size = new Size(0x35, 13);
            this.Label1.Size = size;
            this.Label1.TabIndex = 0x49;
            this.Label1.Text = "Đến ng\x00e0y";
            this.TxtDenNgay.Format = DateTimePickerFormat.Custom;
            point = new System.Drawing.Point(90, 0x17);
            this.TxtDenNgay.Location = point;
            this.TxtDenNgay.Name = "TxtDenNgay";
            size = new Size(0x55, 20);
            this.TxtDenNgay.Size = size;
            this.TxtDenNgay.TabIndex = 0x48;
            this.Label13.AutoSize = true;
            this.Label13.BackColor = Color.Transparent;
            this.Label13.ForeColor = Color.Black;
            point = new System.Drawing.Point(5, 6);
            this.Label13.Location = point;
            this.Label13.Name = "Label13";
            size = new Size(0x2e, 13);
            this.Label13.Size = size;
            this.Label13.TabIndex = 0x47;
            this.Label13.Text = "Từ ng\x00e0y";
            this.TxtTuNgay.Format = DateTimePickerFormat.Custom;
            point = new System.Drawing.Point(4, 0x17);
            this.TxtTuNgay.Location = point;
            this.TxtTuNgay.Name = "TxtTuNgay";
            size = new Size(0x53, 20);
            this.TxtTuNgay.Size = size;
            this.TxtTuNgay.TabIndex = 70;
            this.Panel2.BackgroundImage = ACCOUNTING.My.Resources.Resources.bgleft;
            this.Panel2.Controls.Add(this.TxtTongTriGiaMua);
            this.Panel2.Controls.Add(this.TxtTongChiPhi);
            this.Panel2.Controls.Add(this.TxtTongThanhToan);
            this.Panel2.Controls.Add(this.Label7);
            this.Panel2.Dock = DockStyle.Bottom;
            point = new System.Drawing.Point(0, 0x253);
            this.Panel2.Location = point;
            this.Panel2.Name = "Panel2";
            size = new Size(0x3a6, 0x21);
            this.Panel2.Size = size;
            this.Panel2.TabIndex = 1;
            this.TxtTongTriGiaMua.BackColor = SystemColors.Control;
            this.TxtTongTriGiaMua.DataType = typeof(double);
            this.TxtTongTriGiaMua.FormatType = FormatTypeEnum.GeneralNumber;
            point = new System.Drawing.Point(0x26b, 6);
            this.TxtTongTriGiaMua.Location = point;
            this.TxtTongTriGiaMua.Name = "TxtTongTriGiaMua";
            this.TxtTongTriGiaMua.ReadOnly = true;
            size = new Size(0x6c, 20);
            this.TxtTongTriGiaMua.Size = size;
            this.TxtTongTriGiaMua.TabIndex = 0xc2;
            this.TxtTongTriGiaMua.Tag = null;
            this.TxtTongTriGiaMua.TextAlign = HorizontalAlignment.Right;
            this.TxtTongTriGiaMua.Value = 0;
            this.TxtTongTriGiaMua.VisibleButtons = DropDownControlButtonFlags.None;
            this.TxtTongChiPhi.BackColor = SystemColors.Control;
            this.TxtTongChiPhi.DataType = typeof(double);
            this.TxtTongChiPhi.FormatType = FormatTypeEnum.GeneralNumber;
            point = new System.Drawing.Point(0x2db, 6);
            this.TxtTongChiPhi.Location = point;
            this.TxtTongChiPhi.Name = "TxtTongChiPhi";
            this.TxtTongChiPhi.ReadOnly = true;
            size = new Size(0x58, 20);
            this.TxtTongChiPhi.Size = size;
            this.TxtTongChiPhi.TabIndex = 0xc1;
            this.TxtTongChiPhi.Tag = null;
            this.TxtTongChiPhi.TextAlign = HorizontalAlignment.Right;
            this.TxtTongChiPhi.Value = 0;
            this.TxtTongChiPhi.VisibleButtons = DropDownControlButtonFlags.None;
            this.TxtTongThanhToan.BackColor = SystemColors.Control;
            this.TxtTongThanhToan.DataType = typeof(double);
            this.TxtTongThanhToan.FormatType = FormatTypeEnum.GeneralNumber;
            point = new System.Drawing.Point(0x337, 6);
            this.TxtTongThanhToan.Location = point;
            this.TxtTongThanhToan.Name = "TxtTongThanhToan";
            this.TxtTongThanhToan.ReadOnly = true;
            size = new Size(0x6c, 20);
            this.TxtTongThanhToan.Size = size;
            this.TxtTongThanhToan.TabIndex = 0xc0;
            this.TxtTongThanhToan.Tag = null;
            this.TxtTongThanhToan.TextAlign = HorizontalAlignment.Right;
            this.TxtTongThanhToan.Value = 0;
            this.TxtTongThanhToan.VisibleButtons = DropDownControlButtonFlags.None;
            this.Label7.AutoSize = true;
            point = new System.Drawing.Point(0x216, 10);
            this.Label7.Location = point;
            this.Label7.Name = "Label7";
            size = new Size(0x3b, 13);
            this.Label7.Size = size;
            this.Label7.TabIndex = 0xbf;
            this.Label7.Text = "Tổng cộng";
            this.VSlist.AllowEditing = false;
            this.VSlist.BorderStyle = C1.Win.C1FlexGrid.Util.BaseControls.BorderStyleEnum.Light3D;
            this.VSlist.ColumnInfo = manager.GetString("VSlist.ColumnInfo");
            this.VSlist.Dock = DockStyle.Fill;
            this.VSlist.ExtendLastCol = true;
            this.VSlist.FocusRect = FocusRectEnum.None;
            this.VSlist.KeyActionEnter = KeyActionEnum.MoveAcross;
            point = new System.Drawing.Point(0, 0x30);
            this.VSlist.Location = point;
            this.VSlist.Name = "VSlist";
            this.VSlist.Rows.Count = 1;
            this.VSlist.Rows.DefaultSize = 0x11;
            this.VSlist.SelectionMode = SelectionModeEnum.Row;
            size = new Size(0x3a6, 0x223);
            this.VSlist.Size = size;
            this.VSlist.StyleInfo = manager.GetString("VSlist.StyleInfo");
            this.VSlist.TabIndex = 0x1a;
            this.VSlist.VisualStyle = C1.Win.C1FlexGrid.VisualStyle.Office2007Blue;
            SizeF ef = new SizeF(6f, 13f);
            this.AutoScaleDimensions = ef;
            this.AutoScaleMode = AutoScaleMode.Font;
            size = new Size(0x3a6, 0x274);
            this.ClientSize = size;
            this.Controls.Add(this.VSlist);
            this.Controls.Add(this.Panel2);
            this.Controls.Add(this.Panel1);
            this.FormBorderStyle = FormBorderStyle.FixedDialog;
            this.KeyPreview = true;
            this.MaximizeBox = false;
            this.MinimizeBox = false;
            this.Name = "Frm_RptTongHopHangHoaMuaVao";
            this.StartPosition = FormStartPosition.CenterScreen;
            this.Tag = "BC-MH05";
            this.Text = "TONG HOP HANG HOA MUA VAO";
            this.Panel1.ResumeLayout(false);
            this.Panel1.PerformLayout();
            this.Panel2.ResumeLayout(false);
            this.Panel2.PerformLayout();
            ((ISupportInitialize) this.TxtTongTriGiaMua).EndInit();
            ((ISupportInitialize) this.TxtTongChiPhi).EndInit();
            ((ISupportInitialize) this.TxtTongThanhToan).EndInit();
            this.VSlist.EndInit();
            this.ResumeLayout(false);
        }

        public void loadData()
        {
            this.Cursor = Cursors.WaitCursor;
            string str2 = " AND NK.NgayChungTu BETWEEN '" + LVYModule.Date2Char(this.TxtTuNgay.Text) + "' AND '" + LVYModule.Date2Char(this.TxtDenNgay.Text) + "'";
            switch (this.CboLoaiChungTu.SelectedIndex)
            {
                case 0:
                    str2 = str2 + " AND ( NK.NguonNhap = 'TN' OR NK.NguonNhap = 'NK')";
                    break;

                case 1:
                    str2 = str2 + " AND NK.NguonNhap = 'TN' ";
                    break;

                case 2:
                    str2 = str2 + " AND NK.NguonNhap = 'NK' ";
                    break;
            }
            if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboKhoHang.SelectedValue), "", modGeneral.TypeOfValue.String).ToString().Trim() != "")
            {
                str2 = Conversions.ToString(Microsoft.VisualBasic.CompilerServices.Operators.ConcatenateObject(Microsoft.VisualBasic.CompilerServices.Operators.ConcatenateObject(str2 + " AND CT.KhoaKho = '", this.CboKhoHang.SelectedValue), "'"));
            }
            if (this.AdvNhaCungCap.Value.Trim() != "")
            {
                str2 = str2 + " AND NK.KhoaDoiTuong = '" + this.AdvNhaCungCap.Value + "'";
            }
            string commandText = " SELECT NH.TenViet as TenNhomHang, HH.Ma, HH.TenViet as TenHang, DVT.TenViet As DonViTinh, Sum(CT.SoLuong * CT.HeSo) As SoLuong,  Sum(CT.TienHang) - Sum(CT.TienChietKhau) As TienHang,  Sum(IsNull(CT.TienPhiNhapKhau,0)) + Sum(CT.TienThueNhapKhau) + Sum(CT.TienPhi) As TienPhi, Sum(CT.TienHang) - Sum(CT.TienChietKhau) + Sum(IsNull(CT.TienPhiNhapKhau,0)) + Sum(CT.TienThueNhapKhau) + Sum(CT.TienPhi) As TongCong FROM ST_NhapKhoChiTiet CT LEFT JOIN ST_NhapKho NK on CT.KhoaPhieuNhap = NK.Khoa  LEFT JOIN DM_HangHoa HH on CT.KhoaHangHoa = HH.Khoa LEFT JOIN DM_DonViTinh DVT on HH.KhoaDonViTinh = DVT.Khoa  LEFT JOIN DM_NhomHangHoa NH on HH.KhoaNhom = NH.Khoa WHERE(1 = 1) " + str2 + " GROUP BY NH.TenViet, HH.Ma, HH.TenViet, DVT.TenViet  ORDER BY 1";
            System.Data.DataTable table = DBHelper.ExecuteDataset(modGeneral.ConnectionString, CommandType.Text, commandText, new IDataParameter[0]).Tables[0];
            this.VSlist.DataSource = table;
            this.TxtTongTriGiaMua.Value = LVYModule.SumColGrid(this.VSlist, 5);
            this.TxtTongChiPhi.Value = LVYModule.SumColGrid(this.VSlist, 6);
            this.TxtTongThanhToan.Value = LVYModule.SumColGrid(this.VSlist, 7);
            C1.Win.C1FlexGrid.C1FlexGrid vSlist = this.VSlist;
            vSlist.Cols[0].Visible = false;
            vSlist.Tree.Column = 1;
            vSlist.Subtotal(AggregateEnum.Sum, 0, 0, 0, 4, "{0}");
            vSlist.Subtotal(AggregateEnum.Sum, 0, 0, 0, 5, "{0}");
            vSlist.Subtotal(AggregateEnum.Sum, 0, 0, 0, 6, "{0}");
            vSlist.Subtotal(AggregateEnum.Sum, 0, 0, 0, 7, "{0}");
            vSlist.Cols[4].DataType = System.Type.GetType("Sytem.Decimal");
            vSlist.Cols[4].Format = modGeneral.H_FORMATNUMBER;
            vSlist.Cols[5].DataType = System.Type.GetType("Sytem.Decimal");
            vSlist.Cols[5].Format = modGeneral.H_FORMATNUMBER;
            vSlist.Cols[6].DataType = System.Type.GetType("Sytem.Decimal");
            vSlist.Cols[6].Format = modGeneral.H_FORMATNUMBER;
            vSlist.Cols[7].DataType = System.Type.GetType("Sytem.Decimal");
            vSlist.Cols[7].Format = modGeneral.H_FORMATNUMBER;
            vSlist.Cols[1].Width = 120;
            vSlist.Cols[2].Width = 300;
            vSlist.Cols[3].Width = 100;
            vSlist.Cols[4].Width = 100;
            vSlist.Cols[5].Width = 100;
            vSlist.Cols[6].Width = 100;
            vSlist.Cols[7].Width = 60;
            vSlist[0, 1] = modGeneral.Tranlated("M\x00e3 h\x00e0ng", "");
            vSlist[0, 2] = modGeneral.Tranlated("T\x00ean h\x00e0ng", "");
            vSlist[0, 3] = modGeneral.Tranlated("ĐVT", "");
            vSlist[0, 4] = modGeneral.Tranlated("Số lượng", "");
            vSlist[0, 5] = modGeneral.Tranlated("Trị gi\x00e1", "");
            vSlist[0, 6] = modGeneral.Tranlated("Chi ph\x00ed", "");
            vSlist[0, 7] = modGeneral.Tranlated("Tổng cộng", "");
            vSlist = null;
            this.Cursor = Cursors.Default;
        }

        internal virtual ADVObjects AdvNhaCungCap
        {
            [DebuggerNonUserCode]
            get
            {
                return this._AdvNhaCungCap;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._AdvNhaCungCap = value;
            }
        }

        internal virtual ComboBox CboKhoHang
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboKhoHang;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CboKhoHang = value;
            }
        }

        internal virtual ComboBox CboLoaiChungTu
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboLoaiChungTu;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CboLoaiChungTu = value;
            }
        }

        internal virtual System.Windows.Forms.Button CmdExel
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdExel;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdExel_Click);
                if (this._CmdExel != null)
                {
                    this._CmdExel.Click -= handler;
                }
                this._CmdExel = value;
                if (this._CmdExel != null)
                {
                    this._CmdExel.Click += handler;
                }
            }
        }

        internal virtual System.Windows.Forms.Button CmdLoad
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdLoad;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdLoad_Click);
                if (this._CmdLoad != null)
                {
                    this._CmdLoad.Click -= handler;
                }
                this._CmdLoad = value;
                if (this._CmdLoad != null)
                {
                    this._CmdLoad.Click += handler;
                }
            }
        }

        internal virtual System.Windows.Forms.Label Label1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label1 = value;
            }
        }

        internal virtual System.Windows.Forms.Label Label13
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label13;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label13 = value;
            }
        }

        internal virtual System.Windows.Forms.Label Label2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label2 = value;
            }
        }

        internal virtual System.Windows.Forms.Label Label3
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label3;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label3 = value;
            }
        }

        internal virtual System.Windows.Forms.Label Label4
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label4;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label4 = value;
            }
        }

        internal virtual System.Windows.Forms.Label Label7
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label7;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label7 = value;
            }
        }

        internal virtual Panel Panel1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Panel1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Panel1 = value;
            }
        }

        internal virtual Panel Panel2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Panel2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Panel2 = value;
            }
        }

        internal virtual DateTimePicker TxtDenNgay
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtDenNgay;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtDenNgay = value;
            }
        }

        internal virtual C1NumericEdit TxtTongChiPhi
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtTongChiPhi;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtTongChiPhi = value;
            }
        }

        internal virtual C1NumericEdit TxtTongThanhToan
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtTongThanhToan;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtTongThanhToan = value;
            }
        }

        internal virtual C1NumericEdit TxtTongTriGiaMua
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtTongTriGiaMua;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtTongTriGiaMua = value;
            }
        }

        internal virtual DateTimePicker TxtTuNgay
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtTuNgay;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtTuNgay = value;
            }
        }

        internal virtual C1.Win.C1FlexGrid.C1FlexGrid VSlist
        {
            [DebuggerNonUserCode]
            get
            {
                return this._VSlist;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._VSlist = value;
            }
        }
    }
}

